package com.HeadlineSystem.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import com.HeadlineSystem.dao.CategoryMapper;
import com.HeadlineSystem.service.CategoryService;
import com.HeadlineSystem.util.SessionUtil;

public class CategoryServiceImpl implements CategoryService{
	private SessionUtil sesionUtil = new SessionUtil();
	private SqlSession session;
	
	private CategoryMapper categoryMapper;
	
	
	public CategoryServiceImpl() {
		session = sesionUtil.getSession();
		categoryMapper = session.getMapper(CategoryMapper.class);

	}
	@Override
	public List<Map<String, Object>> findCategoryAll() {
		List<Map<String, Object>> list = categoryMapper.findCategoryAll();
		//sesionUtil.close(session);
		return list;
	}

}
